package cn.cvs.web;

import cn.cvs.pojo.SysRole;
import cn.cvs.service.SysRoleService;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Auther: zwt
 * @Date: 2021/11/22 - 11 - 22 - 19:28
 * @Description: cn.cvs.web
 * @version: 1.0
 */
@Controller
public class SysRoleController {
    @Resource
    SysRoleService sysRoleService;

    @ResponseBody
    @RequestMapping("sys/role/simpleList")
    public Object addRole(){
        List<SysRole> sysRoles = sysRoleService.queryAllRoles();
        return JSON.toJSONString(sysRoles);
    }

}
